package com.bwda.dsrs.filecenter.service.impl;

import com.bwda.dsrs.filecenter.domain.po.keyhistory.KeyHistoryPo;
import com.bwda.dsrs.filecenter.domain.condition.keyhistory.KeyHistoryCondition;
import com.bwda.dsrs.filecenter.mapper.dsrs.KeyHistoryMapper;
import com.bwda.dsrs.filecenter.service.KeyHistoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
 * @author Administrator
 */
@Service
public class KeyHistoryServiceImpl extends BaseServiceImpl<KeyHistoryPo, KeyHistoryCondition, KeyHistoryMapper> implements KeyHistoryService {
    @Autowired
    private KeyHistoryService keyHistoryService;
    @Override
    public List<KeyHistoryPo> queryList(Integer keyId) {
        KeyHistoryCondition keyHistoryCondition = new KeyHistoryCondition();
        keyHistoryCondition.setRegisterKeyId(keyId);
        List<KeyHistoryPo> keyHistoryPo = keyHistoryService.queryList(keyHistoryCondition);
        return keyHistoryPo;
    }

    @Override
    public List<KeyHistoryPo> queryKeyHistoryList(String appCode) {
        KeyHistoryCondition keyHistoryCondition = new KeyHistoryCondition();
        keyHistoryCondition.setAppCode(appCode);
        List<KeyHistoryPo> keyHistoryPo = keyHistoryService.queryList(keyHistoryCondition);
        return keyHistoryPo;
    }
    @Override
    public List<KeyHistoryPo> queryKeyHistoryByKeyId(Integer registerKeyId) {
        return this.getMapper().queryKeyHistoryByKeyId(registerKeyId);
    }
}